<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>秒杀列表</title>
    <%@include file="common/head.jsp" %>
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <p class="navbar-text">列表</p>
        </div>
    </div><!-- /.container-fluid -->
</nav>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <table class="table table-hover">
                    <thead>
                        <th>id</th>
                        <th>产品名称</th>
                        <th>库存</th>
                        <th>开始时间</th>
                        <th>结束时间</th>
                        <th>操作</th>
                    </thead>
                    <tbody>
                        <c:forEach var="item" items="${list}">
                            <tr>
                                <th>${item.id}</th>
                                <td>${item.name}</td>
                                <td>${item.store}</td>
                                <td><fmt:formatDate type="date" value="${item.startTime}" pattern="yyyy-MM-dd YY:hh:ss"/></td>
                                <td><fmt:formatDate type="date" value="${item.endTime}" pattern="yyyy-MM-dd YY:hh:ss"/></td>
                                <td><a target="_blank" href="/page/${item.id}/detail" type="button" class="btn btn-success">详情</a></td>
                            </tr>
                        </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</body>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</html>
